/**
 * Abstract parent class for the debit and
 * credit card classes. All common code and 
 * data fields are stored here.
 * @author Kristopher Gooding/Kyle Scharnhorst
 * @version 4/25/2014
 */
public abstract class Card {
	/**last card number used.*/
	protected static int my_last_card_number;
	/**checking account this card is attatched to.*/
	protected CheckingAccount my_account_connected_to;
	/**card number.*/
	protected int my_card_number;
	/**Owner of the the card.*/
	protected Member my_member;
	/**money limit ofr the card.*/
	protected double my_limit; // you cannot spend more than this limit
	/**current balance for the card.*/
	protected double my_balance;

	/**
	 * super constructor.
	 * @param the_name
	 * @param the_street
	 * @param the_town
	 * @param the_zip_code
	 * @param the_country
	 */
	protected Card(final String the_name, final String the_street,
			final String the_town, final String the_zip_code,
			final String the_country) {
		my_member = new Member(the_name, the_street, the_town, the_zip_code,
				the_country);
	}

	/**
	 * super constructor for a card with a limit.
	 * @param the_name
	 * @param the_street
	 * @param the_town
	 * @param the_zip_code
	 * @param the_country
	 * @param the_limit
	 */
	protected Card(final String the_name, final String the_street,
			final String the_town, final String the_zip_code,
			final String the_country, final double the_limit) {
		my_member = new Member(the_name, the_street, the_town, the_zip_code,
				the_country);
	}

	/**
	 * @return my_member
	 */
	public Member getMember() {
		return my_member;
	}
}
